const crypto = require('crypto-js');
export function aesEncrypt(e, aa?) {
  const r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "XwKsGlMcdPMEhR1B";
  const a = crypto.enc.Utf8.parse(r)
  const u = crypto.enc.Utf8.parse(e)
  const d = crypto.AES.encrypt(u, a, {
      mode: crypto.mode.ECB,
      padding: crypto.pad.Pkcs7
  });
  return d.toString();
};

export function sleep(interval) {
  return new Promise(resolve => {
    setTimeout(resolve, interval);
  });
}


export const isMuseumPoolAvailable = (ticket) => {
  return ticket.status === 4 && ticket.ticketPool > 0
}
